const { defineConfig } = require('@vue/cli-service')

module.exports = defineConfig({
  transpileDependencies: true,
  //关闭编译打包时语法检查
  lintOnSave: false,
  devServer:{
    open: true, //是否自动弹出浏览器页面
    host: "localhost", 
    port: '8080',
    https: false,
    //配置服务器代理，解决跨域问题
    proxy: {
        '/demo/api': {
            target: 'http://localhost:3001', //API服务器的地址
            changeOrigin: true,
            pathRewrite: {
                '^/demo/api': ''
            }
        },
        '/node/api':{
            target: 'http://localhost:3000',
            changeOrigin: true,
            pathRewrite: {
                '^/node/api': ''
            }
        }
        
    },
}
})
